//-----------------------------------------------------------------------
// <copyright file="Identity.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.Live.Core
{
    using System;
    using Microsoft.Live.Messenger;

    /// <summary>
    /// Represents a Windows Live identity.
    /// </summary>
    public abstract class Identity
    {
        /// <summary>
        /// Gets the Windows Live ID for the identity.
        /// </summary>
        public abstract string LiveId
        {
            get;
        }
    }

    internal sealed class MessengerIdentity : Identity
    {
        private readonly MessengerEntity entity;

        internal MessengerIdentity(object obj)
        {
            this.entity = new MessengerEntity(obj);
        }

        internal MessengerEntity Entity
        {
            get { return this.entity; }
        }

        public override string LiveId
        {
            get { return this.entity.GetProperty<string>("LiveId"); }
        }
    }
}
